package com.bbs.toutiao.service.admin.impl;

import com.bbs.toutiao.mapper.admin.AdminHomeMapper;
import com.bbs.toutiao.service.admin.AdminHomeService;
import com.bbs.toutiao.vo.Admin.AdminRegisterCountVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 描述: 管理系统home页面
 * 作者： zhangBin
 * 时间： 2024/3/5 20:25
 * 版本： 1.0
 */

@Service
public class AdminHomeServiceImpl implements AdminHomeService {


    @Resource
    AdminHomeMapper homeMapper;


    /**
     * 描述：查询每日注册人数
     */
    @Override
    public List<AdminRegisterCountVo> registerCounts() {

        return homeMapper.selectRegisterCount();
    }

    /**
     * 查询文章分类数量
     */
    @Override
    public List<Map<String, Long>> articleClassifyCount() {
        return homeMapper.selectArticleClassCount();
    }

    @Override
    public List<Map<String, String>> commentCount() {

        return homeMapper.selectCommentCount();
    }
}
